package com.odobenus.sample.controller;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.odobenus.sample.bean.DBConfig;
import com.odobenus.sample.bean.ZKConfig;

@RestController
public class DemoController {
	@Resource
	private DBConfig dbConfig;
	@Resource
	private ZKConfig zkConfig;
	
	@Value("${app.name}")
	private String appName;
	
	@RequestMapping("appName")
	public String appName() {
		return appName;
	}
	
	@RequestMapping("db")
	public DBConfig db() {
		return dbConfig;
	}
	
	@RequestMapping("zk")
	public ZKConfig zk() {
		return zkConfig;
	}
}
